using System;
using FluentNHibernate.Automapping;
using FluentNHibernate.Cfg;

namespace NHibernateInsight.Tests.Infrastructure.Data
{
    public class Sql2005ExpressDatabaseUsageStrategy : Sql2005DatabaseUsageStrategy
    {
        public Sql2005ExpressDatabaseUsageStrategy(string databaseName)
            : this(databaseName, _DefaultSqlServerName)
        {}

        public Sql2005ExpressDatabaseUsageStrategy(string databaseName, string sqlServerName)
            : base(databaseName)
        {
            SqlServerName = sqlServerName;
        }

        private static string _DefaultSqlServerName
        {
            get
            {
                return "localhost\\SQLEXPRESS";
            }
        }

        protected override string SqlServerInstanceKeyInRegistry
        {
            get
            {
                return "SQLEXPRESS";
            }
        }
    }
}